package sample.todo.android.model;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Task {
	private static final SimpleDateFormat df = new SimpleDateFormat("MM/dd");
	private boolean done;
	private String contents;
	private Date dueDate;
	public Task() {
	}
	public Task(String contents) {
		this.contents = contents;
	}
	public boolean isDone() {
		return done;
	}
	public void setDone(boolean done) {
		this.done = done;
	}
	public String getContents() {
		return contents;
	}
	public void setContents(String contents) {
		this.contents = contents;
	}
	public String getFormatedDate() {
		if (dueDate == null) return "";
		return df.format(dueDate);
	}
	public Date getDueDate() {
		return dueDate;
	}
	public void setDueDate(Date dueDate) {
		this.dueDate = dueDate;
	}
}
